<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<div id="app">
  {{message}}
<npc>
  <span slot="center">标题</span>
  <button slot="right">按钮</button>
</npc>
</div>

<template id="npc">
  <div>
   <slot name="left"><span>左边</span></slot>
    <slot name="center"><span>中间</span></slot>
    <slot name="right"><span>右边</span></slot>
    <slot>哈哈哈</slot>
  </div>
</template>

  <script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el:'#app',
    data:{
      message:"message",

    },
    methods:{

    },
    components:{
      npc:{
        template:'#npc',

      }
    }

  })
</script>

</body>
</html>